#pragma once
#include "aabb.h"
#include "plane.h"
#include "vector3.h"

namespace krryn{
namespace view{
	class frustum{
	public:
		frustum();
		void recalculate();
		bool contains(const math::vector3f &a_Vector) const;
		bool contains(const math::aabb &a_Aabb) const;
	private:
		void calculate();
		math::vector3f combine(int i, const math::vector3f &a_Center, const math::vector3f &l_Size) const;

		enum sides_e{
			right,
			left,
			bottom,
			top,
			back,
			front,
			sides_count
		};

		math::plane m_Planes[sides_count];
	};
}
}
